/**
 * siteconfig-edit.js
 * @author SoChishun
 * @since 1.0.0.0 <2015-3-27> SoChishun Added.
 */
// 状态选择效果
$('input[name="state"]').change(function () {
    var val = $(this).val();
    if (4 == val) {
        $('textarea[name="closed_announcement"]').show('fast');
    } else {
        $('textarea[name="closed_announcement"]').hide('fast');
    }
})


// 表单验证 2015-3-24
$('#frm-edit').validate({
    errorElement: "em",
    rules: {
        site_name: {required: true, minlength: 3, maxlength: 16},
        state: {required: true}
    }
});